home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Tools (InfoMagic)
/
Internet Tools.iso
/
dos_win
/
winsock
/
hacklist
/
94-04.Z
/
94-04
/
000008_rcq@mailserv-D.ftp.com_Sat Apr 9 07:28:38 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1994-04-30
|
3KB
Received: from ftp.com (wd40.ftp.com) by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
id AA01287; Sat, 9 Apr 1994 11:29:34 -0400
Received: from ftp.com by ftp.com ; Sat, 9 Apr 1994 11:29:33 -0400
Received: from mailserv-D.ftp.com by ftp.com ; Sat, 9 Apr 1994 11:29:33 -0400
Received: from rcq.hurricane.ftp.com by mailserv-D.ftp.com (5.0/SMI-SVR4)
id AA19990; Sat, 9 Apr 94 11:28:38 EDT
Date: Sat, 9 Apr 94 11:28:38 EDT
Message-Id: <9404091528.AA19990@mailserv-D.ftp.com>
To: ICH211@ZAM001.ZAM.KFA-JUELICH.DE
Subject: Re: Closing and reusing sockets
From: rcq@ftp.com (Bob Quinn)
Reply-To: rcq@ftp.com
Cc: Multiple recipients of list <winsock-hackers@sunsite.unc.edu>
Sender: rcq@mailserv-D.ftp.com
Repository: mailserv-D.ftp.com, [message accepted at Sat Apr 9 11:28:14 1994]
Originating-Client: hurricane.ftp.com
Content-Length: 2292
> I got the same reply from FTP Software about "no bind used internally" etc,
Specifically, you got it from me, just like Bryan did. :)
> which I actually don't find acceptable. I believe that sample code in a
> specification should work with all compliant implementations, otherwise the
> implementation is *not* specification compliant. Since the FTP Winsock.DLL
> surely has access to all pending connection info it should be able to
> determine at bind() time if there is a local address in use, and return
> EADDRINUSE if necessary. What I had to do in my code is to have the bind()
I don't disagree, we should be compliant. What I've described
to you and Bryan is just a fact of life with PCTCP. Believe me,
I don't like it either. Don't you think I'd change it if I had
"access to all pending connection info" as you say the WinSock
surely does? It would be much easier to change it, than to spend
time telling customers how to code around this deficiency.
Fortunately, there are very few protocols that require any binding
for clients. You two have found two of them: rsh and lpr. I am
sorry you need to do the extra coding for our WinSock. I will help
you all I can, but the fact is if you want to work on our WinSock
the extra effort is required.
> loop followed by a connect() as it should be, and have another loop around
> all this to try a new port if the connect() fails.
Our WIN4RPC DLL had to implement its own rresvport() (sp?) function
to get a reserved port number. To avoid the *SAME PROBLEM* that
you have encountered, our RPC developer used the current time as
a seed into the (pseudo)random() function to get a initial port
between 512 and 1024 for bind() (and as the DLL progresses, it
increments the port number). I have yet to hear of a case when this
has caused a subsequent WSAEADDRINUSE and it is used *heavily*.
This is one alternative to the bind()/connect() loop. I know that
Bryan doesn't like it because there's still a chance that bind()
can succeed and subsequent connect() fail, but I don't think this
is a realistic concern ...and I don't consider myself a gambling man :)
Regards,
--
Bob Quinn rcq@ftp.com
FTP Software, Inc. No. Andover, MA